/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DataSource;

import java.util.ArrayList;
import java.util.Iterator;

/**
 *
 * @author DAVINCI
 */
public class ImagenGeneral {

    public ImagenGeneral() {
        arrayPixels = new Pixel[20][];
        for (int i = 0; i < 20; i++) {
            arrayPixels[i] = new Pixel[20];
        }
    }

    public ImagenGeneral(ArrayList<String> input) {
        arrayPixels = new Pixel[20][];
        for (int i = 0; i < 20; i++) {
            arrayPixels[i] = new Pixel[20];
        }
        Iterator it = input.iterator();
        while (it.hasNext()) {

            int i = 0;
            String linea = it.next().toString();
            String[] arraydotcomma = linea.split(";");
            for (int j = 0; j < 10; j++) {
                
                String[] arraycomma = arraydotcomma[j].split(",");
                System.out.println(arraycomma[0]);
                System.out.println(arraycomma[1]);
                System.out.println(arraycomma[2]);
                arrayPixels[i][j] = new Pixel(Byte.valueOf(arraycomma[0]), Byte.valueOf(arraycomma[1]), Byte.valueOf(arraycomma[2]));
                
            }
            i++;
        }
    }
    private Pixel[][] arrayPixels;

    public Pixel[][] getArrayPixels() {
        return arrayPixels;
    }

    public void setArrayPixels(Pixel[][] arrayPixels) {
        this.arrayPixels = arrayPixels;
    }

 
    
}
